The present invention pertains to hardware-accelerated computer processing of multidimensional data, and, particularly, to systems for the creation and display of photoreal interactive graphics.
The rendering of graphical images is an application of digital signal processing which requires intensive computation at multiple levels of the process. The typical three-dimensional graphics workstation architecture consists of multiple subsystems that are allocated functions uniquely. General purpose computers are typically used for non-display rendering of three-dimensional models into human viewable images. The non-display rendering process entails representation of the scene as a set of polygons, to which attributes such as texture and shadowing are applied through computation.
By applying some specialized architectural components of the three-dimensional graphics workstation, the non-display rendering process can be accelerated. In the state-of-the-art graphics workstation, each sub-system is used for a different part of the processing. The CPU/Main memory is used for general algorithmic processing, and temporary storage of data. Peripheral devices are used to allow human interaction with the workstation, to transmit and to permanently store digital information.
One such sub-system is the graphics display accelerator, typically used to take geometric shapes, mathematically place them in three-dimensional mathematical space, associate simulated lighting and optical effects, and produce an electronic picture in a frame buffer for visible display using a two-dimensional display component.
In this conventional architecture, the graphics display accelerator is a one-way state machine pipeline processor with low volume, highly abstracted data flowing in, and low level information displayed on the workstation monitor. The operation of the graphics display accelerator in the conventional architecture can be understood in the context of rendering processes.
One such rendering process is referred to as ray tracing (or ray casting) an image to be displayed. The ray trace rendering process consists of defining a series of polygons (typically triangles), at least one viewport or window through which the human views the simulated scene, and various light sources and other optical materials in a mathematical three-dimensional space. A viewer eye location is selected and a window on an arbitrary view plane are selected. The window is considered to be comprised of small image elements (pixels) arranged into a grid at a desired output resolution. Often the window is chosen to correspond to the display monitor at a given resolution, and the eye location is chosen to be at some location outside the screen to approximate where a human observer""s eye may actually be located. Then, for each pixel of the window, a ray is fired from the eye location, through the pixel, and into the scene; the pixel is then colored (and assigned other attributes) based upon the intersection of the ray with objects and light sources within the scene. The ray, in effect, bounces around the objects within the scene, and surface and optical effectors modify the simulated light rays, and alter the eventual characteristics of the display pixel. More information regarding ray tracing may be found in Computer Graphics, Principles and Practice, 2d Ed. in C, by Foley, van Dam, et al, Addison-Wesley publ. (1996); this reference is hereby incorporated herein by reference.
To reduce the amount of processing necessary, frequently software xe2x80x9cZ-Buffersxe2x80x9d are used to spatially sort the polygons and to reduce the processing of un-necessary (non-visible) polygons. If a polygon is obscured by another polygon, the ray is not processed. However, because ray tracing is so computationally expensive, even in a high-performance three-dimensional workstation, the graphics display accelerator frequently uses a simpler type of rendering. Such accelerators commonly provide special purpose hardware components that provide Z-Buffer sorting, a stencil buffer, texture processing and geometry (vertex coordinate) transformation calculation.
Using a typical graphic display accelerator generally consists of loading each polygon into local memory on the graphic display adapter, projecting the three-dimensional coordinates onto the viewport two-dimensional coordinate system, tri-linearly interpolating (with perspective correction) any surface color and optional texture pattern. Current state-of-the-art rendering employs a high-performance three-dimensional graphics library such as, for example, OpenGL, that is supported by numerous hardware and software vendors. OpenGL significantly speeds the process of preview rendering, but it has some limitations. These limitations include its inability to directly support Phong shading and bump maps, graphics effects which provide more realistic images than simple Gouraud shading, which is supported by OpenGL.
In a preferred embodiment there is provided a rendering apparatus for providing, with respect to a defined viewer location and a defined viewport, a desired rendering of objects defined by object data having an object data format, in a three-dimensional object space. The apparatus in this embodiment has a graphics accelerator for transforming object data into image data determined with respect to the defined viewer location and the defined viewport, and a rendering processor for converting at least one parameter characterizing the desired rendering into parameter data in object data format, feeding the parameter data to the graphics accelerator, and converting resulting image data as to the at least one parameter to a further processed result pertinent to the desired rendering.
In a further embodiment, the apparatus has an intermediate memory in which is stored the image data from the graphics accelerator, wherein the rendering processor converts the image data stored within the intermediate memory into the further processed result. The image data may be defined by values associated with a plurality of pixel locations in an image. In a further embodiment, the rendering processor, before feeding the object data to the graphics accelerator, utilizes a tag assigned to each of the objects, so as to associate by tag pixel locations in the image with objects. Each of the objects has a surface that may be represented by a plurality of primitive polygons, and the rendering processor, before feeding the to object data to the graphics accelerator, may utilize a tag assigned to the primitive polygons, so as to associate by tag pixel locations with primitive polygons. The tag may be a color. The rendering processor, as part of converting resulting image data, identifies by tag the portions of object surfaces present in the image, and restricts further processing associated with the desired rendering to such portions so as to reduce processing overhead associated with the desired rendering. Related methods are provided.
In a further embodiment, there is provided a graphics rendering program stored on a computer readable medium for providing a desired rendering of objects defined by object data having an object data format, in a three-dimensional object space. The program is configured so as to be executable by a computer having a two-dimensional graphics accelerator for transforming object data into image data determined with respect to a defined viewer location and a defined viewport. When loaded into the computer, the program causes the establishment of a rendering apparatus having a graphics accelerator for transforming object data into image data determined with respect to the defined viewer location and the defined viewport, and a rendering processor for converting at least one parameter characterizing the desired rendering into object data format, feeding the object data to the graphics accelerator, and converting resulting image data to a further processed result pertinent to the desired rendering.
The computer further includes an intermediate memory in which the rendering program causes to be stored the image data from the graphics accelerator, and wherein the rendering processor converts the image data stored within the intermediate memory into the further processed result.